package com.qk.management.mapper;

import com.qk.entity.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 *
 *
 * @author blusr
 * @version 1.0
 * @date 2025/9/29 10:33
 */
@Mapper
public interface DeptMapper {
    @Insert("insert into t_dept(name, status, create_time, update_time) values(#{name}, #{status}, #{createTime}, #{updateTime})")
    void insert(Dept dept);

    List<Dept> list(@Param("name") String name, @Param("status") Integer status);

    @Select("select * from t_dept where id = #{id}")
    Dept selectById(Integer id);

    void update(Dept dept);

    @Delete("delete from t_dept where id = #{id}")
    void delete(Integer id);

    @Select("select * from t_dept")
    List<Dept> listDept();
}
